def func(li):
    len_li =  len(li)
    if len_li>2:
        print("列表长度大于2")
        new_li = li[0:2]
    return (new_li)

res = func([12,12,45,78,32,12])
print(res)

